package org.wings.main;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;

import org.dom4j.DocumentException;
import org.wngs.util.PropertiesUtil;
import org.wngs.util.XmlUtil;

public class MainActivity {
	
	public static void main(String[] args) {
		PropertiesUtil propertiesUtil = new PropertiesUtil();
		XmlUtil xmlUtil = new XmlUtil();
		Properties prop = propertiesUtil.getPropertiesInClass("setting.properties");
		if (prop == null) { return; }
		System.out.println(prop.get("rss"));
		
		try {
			xmlUtil.iterate(xmlUtil.parse(new URL((String) prop.get("rss"))));
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (DocumentException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
